//统一错误格式处理
module.exports = {
  userFormateDateError: {
    code: '10001',
    message: '用户名或密码为空！',
    result: ''
  },
  userAlreadyExited: {
    code: '10002',
    message: '用户已经存在',
    result: ''
  },
  userRegisterError: {
    code: '10003',
    message: '用户注册错误',
    result: ''
  },
  userNotExist: {
    code: '10005',
    message: '用户不存在',
    result: ''
  },
  userLoginError: {
    code: '10005',
    message: '用户登录失败',
    result: ''
  },
  invalidPassword: {
    code: '10006',
    message: '密码不匹配',
    result: ''
  },
  samePassword: {
    code: '10007',
    message: '新密码和旧密码相同',
    result: ''
  },
  changePassword: {
    code: '10008',
    message: '修改密码失败',
    result: ''
  },
  tokenExpiredError: {
    code: '10101',
    message: 'token已过期!',
    result: ''
  },
  invalidToken: {
    code: '10102',
    message: '无效的token!',
    result: ''
  },
  notToken: {
    code: '10103',
    message: '没有携带令牌!',
    result: ''
  },
  hasNotAdminPermission: {
    code: '10103',
    message: '没有管理员权限！',
    retult: ''
  },
  cateSaveError: {
    code: '20101',
    message: '新增分类失败',
    result: ''
  },
  fileUploadError: {
    code: '30201',
    message: '课程图片上传失败'
  },
  courseFormatError: {
    code: '30203',
    message: '课程参数格式错误',
    result: ''
  },
  publishCourseError: {
    code: '30204',
    messgae: '发布课程错误',
    result: ''
  },
  saveCourseInfoError: {
    code: '30205',
    messgae: '保存课程信息错误',
    result: ''
  },
  getCourseInfoError: {
    code: '30206',
    messgae: '获取课程信息错误',
    result: ''
  },
  getChapterError: {
    code: '30207',
    messgae: '获取章节信息错误',
    result: ''
  },
  getChaptersError: {
    code: '30208',
    messgae: '通过课程ID获取章节课时信息错误',
    result: ''
  },
  getChapterByIdError: {
    code: '30209',
    messgae: '通过章节ID获取章节信息错误',
    result: ''
  },
  saveOrUpdateChapterErr: {
    code: '30210',
    message: '新增或者更新章节错误',
    result: ''
  },
  invalChapterId: {
    code: '30211',
    message: '待修改的章节不存在！',
    result: ''
  }
}
